
<!DOCTYPE html>
<html lang="zh">
<head>


  <meta charset="utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7, IE=9" />

  <title>热映电影_最新上映电影网上订票-源辰影院</title>
  <link href="css/movie.css" rel="stylesheet"/>

  <script src="https://unpkg.com/vue@2.7.14/dist/vue.min.js"></script>
  <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
  <!-- 引入样式 -->
  <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
  <!-- 引入组件库 -->
  <script src="https://unpkg.com/element-ui/lib/index.js"></script>

  <script src="https://static.ydpcdn.cn/scripts/jquery-1.9.1.min.js" type="text/javascript"></script>

  <script src='https://static.ydpcdn.cn/scripts/jquery-ui-1.10.3.custom.min.js' type='text/javascript'></script>
  <script src="https://static.ydpcdn.cn/scripts/cdn_ydp.js?201404291501"></script>



</head>
<body>
<body>
<div id="showFastDiv" style="display: none;">
</div>
<div class="wrapper">
  <!--顶部开始-->
  <div class="top" id="loginSection">
    <!--顶部开始-->
    <div class="top_box">
      <div class="top_one">
        看电影，来源辰影院！
      </div>
      <div id="app7">
        <template>
          <div>
            <div  v-if="!isLoggedIn" class="top_two">
              <a href="login.html" class="cRmain">登录</a><span class="cRddd"> 丨 </span><a
                    href="signup.html" class="cRmain">注册</a><span class="cRddd"> 丨 </span>
            </div>

            <div  v-else class="top_two">
              <p>
                <span class="cRmain">{{ uname }}</span>欢迎来到源辰影院！
                <a href="login.html" class="cRmain">[退出]</a> |
                <a href="myorder.html" class="cRmain">[订单]</a><span class="cRddd">  </span>
              </p>
            </div>
          </div>
        </template>

        <script>

          var v = new Vue({
            el:"#app7",
            data() {
              return {
                isLoggedIn: false,
                uname: '',
              };
            },
            created() {
              let p = new URLSearchParams();
              axios.post("login?op=userinfo",p).then(res=>{
                if (res.data.code == 200) {
                  this.isLoggedIn = true;
                  this.uname = res.data.uname;
                }
              })
            },
          });
        </script>
      </div>
      </div>
    </div>
  </div>
  <!--快速登录-->
  <!--顶部 End-->
<!--头部开始-->
<div class="header">
  <h1>源辰影院</h1>
  <div class="regionbox" style="z-index: 1;" id="regionSection">

  </div>
  <form action="/search" id="searchform" method="get">
    <div style="width: 361px; float: right; margin-top: 5px">
      <!--搜索开始-->
      <a href="search.html">搜索</a>
      <!--搜索 End-->
    </div>
  </form>
</div>
<!--头部 End-->
<!--导航开始-->
<div class="nav_box">
  <div class="nav">
    <ul id="defaultUL">
      <li><a href="index.html" title="首页">首页</a></li>
      <li><a href="movie.html" title="热映电影">热映电影</a></li>
      <li><a href="cinema.html" title="影厅">影厅</a></li>
    </ul>
  </div>
</div>
  <!--导航 End-->
  <div id="body">
    <section class="content-wrapper main-content clear-fix">
      <!--内容框架-->
      <div class="center ">
        <!--最新电影-->
        <div class="m_left border">
          <div class="film_tab">
            <ul>
              <li class="on font_family fs16 cRmain" id="tag0" onclick="SwitchTo(0);" style="cursor: pointer;">正在热映
              </li>
              <li class="om font_family fs16" id="tag1" onclick="SwitchTo(1);" style="cursor: pointer;">即将上映
              </li>
            </ul>
          </div>
          <!--列表开始-->
          <div id="section0">
            <div id="app">
              <template>
                <div>
                  <div class="m_lsit" v-for="movie in movies" :key="movie.id">
                    <dl>
                      <dd>
                        <a href="movie1.html" :title="movie.title">
                          <img :src="movie.image" :width="150" :height="210" :alt="movie.title">
                        </a>
                      </dd>
                      <dt>
                        <h2 class="font_family">
                          <a href="movie1.html" :title="movie.title">{{ movie.mname }}</a>
                        </h2>
                        <ul>
                          <li><span class="cRgray">类型：</span>{{ movie.genre }}</li>
                          <li><span class="cRgray">导演：</span>{{ movie.director }}</li>
                          <li title="{{ movie.actors }}"><span class="cRgray">主演：</span>{{ movie.actors }}</li>
                        </ul>
                        <a href="movie1.html" class="a_link">选座购票</a>
                      </dt>
                    </dl>
                  </div>
                </div>
              </template>
            </div>

              <script>
                var v = new Vue({
                  el:"#app",
                  data() {
                    return {
                      movies: []
                    };
                  },
                  created() {
                    // 从数据库中获取数据
                    this.fetchMovies();
                  },
                  methods: {
                    fetchMovies() {
                      axios.post("movie?op=query").then(res => {
                        this.movies = res.data;
                      })
                    }
                  }
                });
              </script>
          </div>
          <div  id="section1">

            <div  id="app1" class="m_bd clearfix">
              <template>
                <div>
                  <dl class="up lt mb10 pb_m" v-for="movie in movies" :key="movie.id">
                    <dd class="lt">
                      <a href="movie1.html" :title="movie.title">
                        <img :src="movie.image" :width="104" :height="146">
                      </a>
                    </dd>
                    <dt class="lt lh24">
                      <p class="fs14 lh24">
                        <a href="movie1.html" :title="movie.title">
                          <b>{{ movie.mname }}</b>
                        </a>
                      </p>
                      <p>
                        <span class="cRgray">类型：</span>{{ movie.genre }}
                      </p>
                      <p>
                        <span class="cRgray">主演：</span>{{ movie.actors }}
                      </p>
                    </dt>
                  </dl>
                </div>
              </template>
            </div>

            <script>
              var v = new Vue({
                el: "#app1",
                data() {
                  return {
                    movies: []
                  };
                },
                created() {
                  // 从数据库中获取数据
                  this.fetchMovies();
                },
                methods: {
                  fetchMovies() {
                    // 使用适当的方法从数据库中获取电影数据，并将其赋值给movies数组
                    // 示例代码：
                    // 假设您已经从数据库中获取到了电影数据
                    axios.post("movie?op=search&&votes=500000").then(res => {
                      this.movies = res.data;
                    })
                  }
                }
              });
            </script>
            <!--列表 End-->
          </div>

        </div>
        <!--最新电影 End-->
        <div class="right">
          <div class="border mb10">
            <div class="h_tab">
              <ul>
                <li id="ranktag0" class="on">热映排行榜</li>

              </ul>
            </div>
            <div id="rankSec0">
              <div class="h_list font_family">
                <ul>
                  <li v-for="(t,i) in tops"><a href="movie1.html" title="t" target="_blank">
                    {{i + 1}}.{{t.mname}}</a></li>

                </ul>
              </div>
            </div>

            <script>
              var v = new Vue({
                el: "#rankSec0",
                data: {tops: []},
                created() {
                  // 从数据库中获取数据
                  this.fetchMovies();
                },
                methods: {
                  fetchMovies() {
                    axios.post("movie?op=top6").then(res => {
                      this.tops = res.data;
                    })
                    // 使用适当的方法从数据库中获取电影数据，并将其赋值给movies数组
                    // 示例代码：
                    // 假设您已经从数据库中获取到了电影数据
                    // 可以根据从数据库中获取到的数据在这里添加更多电影对象
                  },
                }
              });

            </script>

            <!--右边排行榜 End-->
            <script type="text/javascript">
              $(function () {
                $("#ranktag0").hoverDelay({
                  hoverEvent: function () {
                    SwithRankSec(0);
                  }
                });
                $("#ranktag1").hoverDelay({
                  hoverEvent: function () {
                    SwithRankSec(1);
                  }
                });
                $("#rankSec1").hide();

              });
            </script>

          </div>
          <!--热门活动-->

        </div>
      </div>
      <!--内容 End-->
      <script type="text/javascript">
        $(function () {
          $("#section1").hide();
        });

        function SwitchTo(i) {
          for (j = 0; j <= 2; j++) {
            if (j != i) {
              $("#section" + j).hide();
              $("#tag" + j).removeClass("cRmain on").addClass("om");
              $("#tag" + j).find("div").attr("class", "f_prompt_2 fs12");
            } else {
              $("#section" + i).show();
              $("#tag" + i).addClass("cRmain on").removeClass("om");
              $("#tag" + j).find("div").attr("class", "f_prompt fs12");
            }
          }
        }
      </script>
      <script language="javascript" type="text/javascript">
        $(function () {
          ChangeDefaultUL(1);
        });
      </script>

    </section>
  </div>
  <!--帮助 版权-->
  <div class="explain">
    <div class="explain_er">
      <dl>
        <dd>
          <p class="a1">
          </p>
          新手上路</dd>
        <ul>
          <li><a href="/help/register" title="会员注册">会员注册</a></li>
          <li><a href="/help/login" title="如何登录">如何登录</a></li>
          <li><a href="/help/process" title="快速购票">快速购票</a></li>
          <li><a href="/help/password" title="找回密码">找回密码</a></li>
        </ul>
      </dl>
      <dl>
        <dd>
          <p class="a2">
          </p>
          购票指南</dd>
        <ul>
          <li><a href="/help/process" title="购票流程">购票流程</a></li>
          <li><a href="/help/method" title="取票方法">取票方法</a></li>
          <li><a href="/help" title="支付方式">支付方式</a></li>
        </ul>
      </dl>
      <dl>
        <dd>
          <p class="a3">
          </p>
          常见问题</dd>
        <ul>
          <li><a href="/help" title="购票常见问题">购票常见问题</a></li>
          <li><a href="/help/recharge" title="会员充值问题">会员充值问题</a></li>
          <li><a href="/help/price" title="影片票价问题">影片票价问题</a></li>
          <li><a href="/help/coupon" title="优惠劵">优惠劵</a></li>
        </ul>
      </dl>
      <dl>
        <dd>
          <p class="a4">
          </p>
          关于我们</dd>
        <ul>
          <li><a href="/about">公司介绍</a></li>
          <li><a href="/sitemap">网站地图</a></li>
        </ul>
      </dl>
      <dl>
        <dd>
          <p class="a5">
          </p>
          客户服务</dd>
        <ul>
          <li><a href="#" class="bz">电话：400-677-8292</a></li>
          <li><a href="#" class="bz">邮箱：service@yidepiao.com</a></li>
        </ul>
      </dl>
    </div>
  </div>
</div>


<script type="text/javascript">
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-35906595-1']);
  _gaq.push(['_addOrganic', 'm.baidu.com', 'word', true]);
  _gaq.push(['_addOrganic', 'image.baidu.com', 'word', true]);
  _gaq.push(['_addOrganic', 'baidu', 'word']);
  _gaq.push(['_addOrganic', 'soso', 'w']);
  _gaq.push(['_addOrganic', '3721', 'name']);
  _gaq.push(['_addOrganic', 'youdao', 'q']);
  _gaq.push(['_addOrganic', 'www.so.com', 'q']);
  _gaq.push(['_addOrganic', 'so.360.cn', 'q']);
  _gaq.push(['_addOrganic', 'vnet', 'kw']);
  _gaq.push(['_addOrganic', 'sogou', 'query']);
  _gaq.push(['_addOrganic', 'bing', 'q']);
  _gaq.push(['_trackPageview']);

  (function () {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
</script>
</body>
</body>
</html>